Exemplary embodiments relate generally to cache storage systems, and more particularly to user-controlled targeted cache purge.
In order to test error injection for a given cache unit, a user needs to know what information currently resides in the cache. Typically, a user prefers to fill that space in the cache with specific information which can then be retrieved in order to see how the error injection has worked. In the past, to clear out a section of the cache, a selective purge could be sent along with an address range that would cover a whole index, clear out the whole cache or send in many fetches to that index so it fills up with known addresses. A purge refers to an operation that removes data from a cache, either because the data is bad or because the space in the cache is needed for other data.
As an index can have a range of hundreds if not thousands of different addresses, purging out based on address range can be very time consuming. Only a few addresses may be present in the cache so the castout engine must go through and do a look up for every address in the range to see if it needs to be cast out. In addition, purging out the whole cache can be very disruptive to the error injection test and prevents setting authentic test conditions. The drawback of sending in multiple fetches requires a fairly complex software set up procedure, takes longer to replace all the data, and does not guarantee that operations will not be replaced by other operations that might be occurring during those fetches.